package com.clothing.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.clothing.entity.Banner;
import com.clothing.service.BannerService;
import com.clothing.utils.page.Filter;


/**
 * @ClassName: BannerServiceImpl 
 * @Description: TODO(Banner-ServiceImpl)
 * @author Charles
 * @date 2018年5月7日
 * @version 1.0
 */
@Service
public class BannerServiceImpl extends
        BaseServiceImpl<Banner, Long> implements BannerService
{
    @Override
    public List<Banner> findBannerList(Boolean enabled)
    {
        if (null != enabled)
        {
            List<Filter> filters = new ArrayList<>();
            filters.add(Filter.eq("enabled", enabled));
            
            return findList(null, filters, null);
        }
        
        return findAll();
    }
}
